Skip to content

Validate model publishing before remote writes and preserve failures - #947

Closed
Gajesh2007 wants to merge 2 commits into
masterfrom
refactor/model-publishing-preflight
Closed

Gajesh2007 wants to merge 2 commits into
masterfrom
refactor/model-publishing-preflight

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

A failed Secret Manager lookup could still reach an R2 upload because export VAR="$(gcloud ...)" hid the command failure. Fetch credentials with standalone assignments, reject empty results, then export them before any upload.

Rollback preparation now validates registry IDs, a distinct destination, quantization and positive int64 fields before copying objects. It prepares registration/promotion JSON up front and removes its owned staging directory on exit. A portable printf also fixes macOS Bash interpreting the ellipsis after $SRC_VERSION as part of the variable name, which previously aborted after registration and before promotion.

flowchart LR
  subgraph Before
    A[Publish or prepare rollback] --> B[export hides failed credential lookup]
    B --> C[R2 upload or recursive copy]
    C --> D[Rollback numeric conversion]
    D --> E[Invalid input fails after remote changes]
    D --> F[Register then expand version beside ellipsis]
    F --> G[macOS Bash aborts before promotion]
  end
  subgraph After
    A2[Publish or prepare rollback] --> B2[Rollback validates and encodes API payloads]
    B2 --> C2[Standalone credential lookups and nonempty check]
    C2 --> D2[Failure exits before remote writes]
    C2 --> E2[Copy or upload then register and promote]
    E2 --> F2[EXIT trap cleans owned staging]
  end
Loading

Validation: six offline Python fixtures pass, exercising both scripts with local gcloud, aws, curl and swift stubs. Baseline runs reproduce 36 failing subcases, including the normal rollback promotion failure on system Bash. Existing publish capability and pinned Hugging Face workflow payload tests also pass, as do shell parsing, CI YAML parsing and docs lint for 278 pages. Independent production-source review found no introduced blockers.

The fixture runs no real cloud, coordinator, Swift or model operation. This is preflight/failure-handling work; completed remote copies or registrations are not rolled back automatically if a later operation fails. The operations runbook describes how to inspect that state before retrying.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 12, 2026 12:41am UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 12:41am UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 12:41am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T00:44:08.290327Z 7e71f84 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1096, the combined tooling, benchmark and E2E refactor PR. Your latest head 7e71f840efd8b3760e305f8eb7ca815b858dd60a is preserved in aggregate 9d2160bb370e8a0dbf3810e61a5e48fe66345651, along with the relevant review fixes. Continue review and merge at #1096 (after provider #1094 and web #1095). Closing this duplicate merge path; the source branch and review history are retained.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch had an error being deployed

1 failed and 3 active deployments
benchmarks — 7e71f840 Deployed Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1027
Preview – d-inference — 7e71f840 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 7e71f840 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — 7e71f840 Deployed Sep 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant